#coding:utf-8

from PyQt4 import QtCore

from ..Connector import addDerived


class OnlineResponse(QtCore.QObject):
        event = QtCore.pyqtSignal("PyQt_PyObject")
        def __init__(self,parent=None):
                super(OnlineResponse,self).__init__(parent)
        @addDerived("/message/*[@xmlns='askseelove:event:profileview']/User")
        def derived(self,xml):
                if self.parent().selfJid != xml["from"]:
                        self.event.emit(xml)
                        
